<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>

<body>
  <script src="node_modules//@babel/standalone/babel.js"></script>
  <script>
    var input = 'const getMessage=()=>"hello world";';
    var output = Babel.transform(input, {
      presets: ['es2015']
    }).code;
    console.log(output)
  </script>
  <script type="text/babel">
    const getMessage=()=>"hello you";
    console.log(getMessage())
  </script>
</body>

</html>